package com.faithbj.device.model.dto;

import java.io.Serializable;
import java.util.Date;

public class ReservedMember implements Serializable{
	
	private static final long serialVersionUID = 1900167748635687586L;
	
	protected String username;// 用户名
	
	protected String realName;

	protected String email;// E-mail

	protected String telephone;// 电话或手机号
	
	private String beginDate;// 开始日期字符串

	private String endDate;// 结束日期字符串

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getRealName() {
		return realName;
	}

	public void setRealName(String realName) {
		this.realName = realName;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getTelephone() {
		return telephone;
	}

	public void setTelephone(String telephone) {
		this.telephone = telephone;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}
	
	

	public String getBeginDate() {
		return beginDate;
	}

	public void setBeginDate(String beginDate) {
		this.beginDate = beginDate;
	}

	public String getEndDate() {
		return endDate;
	}

	public void setEndDate(String endDate) {
		this.endDate = endDate;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		  result = prime * result + ((username == null) ? 0 : username.hashCode());
		  result = prime * result + ((realName == null) ? 0 : realName.hashCode());
		  result = prime * result + ((email == null) ? 0 : email.hashCode());
		  result = prime * result + ((telephone == null) ? 0 : telephone.hashCode());
		  result = prime * result + ((beginDate == null) ? 0 : beginDate.hashCode());
		  result = prime * result + ((endDate == null) ? 0 : endDate.hashCode());
		  return result;
	}

	@Override
	public boolean equals(Object obj) {
		if(this==obj)
			return true ;
		
		//如果是空
		if(obj==null )
			return false;
		
		if (!(obj instanceof ReservedMember))
			return false;
		
		ReservedMember member=(ReservedMember)obj;
		
		return member.getEmail().equals(email)
				&&member.getRealName().equals(realName)
				&&member.getTelephone().equals(telephone)
				&&member.getUsername().equals(username)
				&&member.getBeginDate().equals(beginDate)
				&&member.getEndDate().equals(endDate);
	}

	
}
